﻿using Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Models;
using System;

namespace Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.ViewModels
{
    public class RuleViewModel : ViewModelBase
    {
        private Rule rule;


        public string CheckId
        {
            get { return rule.CheckId; }
            set { rule.CheckId = value; OnPropertyChanged("CheckId"); }
        }

        public string Category
        {
            get { return rule.Category; }
            set { rule.Category = value; OnPropertyChanged("Category"); }
        }

        public string Name
        {
            get { return rule.Name; }
            set { rule.Name = value; OnPropertyChanged("Name"); }
        }

        public string Description
        {
            get { return rule.Description; }
            set { rule.Description = value; OnPropertyChanged("Description"); }
        }


        public RuleViewModel()
            : this(new Rule())
        {
        }

        public RuleViewModel(Rule rule)
        {
            this.rule = rule;
        }
    }
}
